// 导入joi
const joi = require('joi')
    //定义班级名称验证规则
const class_name = joi.string().pattern(/^(DT)\d{3}$/).required()
    // 定义班级类型验证规则
const class_type = joi.string().min(1).required()
    // 定义id验证规则
const id = joi.number().integer().required()
    // 向外共享验证规则对象
exports.add_class_schema = {
    body: {
        class_name,
        class_type
    }
}

exports.delete_class_schema = {
    body: {
        id
    }
}
exports.update_class_schema = {
    body: {
        class_name,
        class_type,
        id
    }
}